#include<stdio.h>
#include<math.h>
int main(){
	int i=1,N,m,n;
	double t;
	scanf("%d",&N);
	while(i <= N){
		scanf("%d %d",&m,&n);
		if(m%2 && n%2){
			t = m*n- 1 + sqrt(2);
		}else{
			t = m*n;
		}
		printf("Scenario #%d:\n",i);
		printf("%.2f\n\n",t);
		i++;
	}
	return 0;
}